package com.peanut.mapper;

import com.orm.annotation.Select;
import com.orm.mapper.BaseMapper;
import com.peanut.entity.ApiUrl;
import com.peanut.entity.vo.ApiUrlTreeVo;

import java.util.List;

public interface ApiUrlMapper extends BaseMapper<ApiUrl> {

	// 查顶级接口
	@Select("select id,api_url,comment,parent_id from api_url where parent_id is null or parent_id = 0")
	List<ApiUrlTreeVo> queryTopApiUri();
	
	
	// 查下级接口
	@Select("select id,api_url,comment,parent_id from api_url where parent_id is not null or parent_id != 0")
	List<ApiUrl> querySonApiUri();
}
